@keyframes slide-left {
  0% {
    transform: translateX(6.25rem);
  }

  100% {
    transform: translateX(0);
  }
}

@mixin ani() {
  // animation:slide-left 0.5s cubic-bezier(0.25,0.46,0.45,0.94) both;
}

.loginMask {
  @apply fixed left-0 top-0 bottom-0 right-0 flex justify-center items-center bg-black-50;
  z-index: var(--modal-index);
}

@keyframes scale-up-center {
  0% {
    transform: scale(0.5);
  }

  100% {
    transform: scale(1);
  }
}

.loginBox {
  @apply rounded-lg flex flex-col items-center overflow-hidden overflow-x-auto max-h-screen;
  width: 26.25rem;
  background-color: #2a2a31;
  padding: 2.5rem 3.125rem 2.75rem;
  animation: scale-up-center 0.2s cubic-bezier(0.39, 0.575, 0.565, 1) both;

  .loginClose {
    @apply absolute right-3 top-3 w-6 h-6 cursor-pointer;
  }

  .title {
    @apply flex items-center mb-10 text-white;

    .logo {
      @apply object-contain h-8;
      width: 7.5rem;
    }

    font-size: 1.625rem;
  }
}

// 输入邮箱DOM
.enterEmail {
  @apply w-full;

  .btn {
    @apply bg-theme text-base text-white;
    width: 20rem;
    height: 2.75rem;
  }

  .tip {
    @apply text-xs mt-2 mb-6;
    color: #868686;
    line-height: 1.125rem;
  }

  .errorInfo {
    @apply text-xs mt-2;
    color: #ff3e3e;
    line-height: 1.125rem;
  }
}

.input {
  @apply w-full flex items-center px-5 w-full;
  height: 2.75rem;
  border: 1px solid #5a5a5a;
  border-radius: 2.5rem;

  & > input {
    @apply flex-1 text-sm text-white h-full bg-transparent border-0 outline-0;

    &::placeholder {
      color: #b2b2b2;
    }
  }

  .addon {
    @apply w-fit shrink-0 text-base;
  }

  .code {
    @apply text-sm;
  }
}

.inputImg {
  @apply w-5 h-5 cursor-pointer;
}

// 第一次注册DOM
.signIn {
  @apply w-full self-start;
  @include ani();
  color: #b2b2b2;

  .btn {
    @apply bg-theme text-base text-white mt-6;
    width: 20rem;
    height: 2.75rem;

    &.btnLoading {
      background-color: #999;
    }
  }

  .email {
    @apply text-white text-center;
  }

  .tips {
    @apply text-xs mt-2 mb-1;
    color: #868686;
  }

  .error {
    @apply text-xs mt-2;
    color: #ff3e3e;
    line-height: 1.125rem;
  }

  .setPwd {
    @apply text-base mt-5 mb-2;
  }

  .pwd {
    @apply mt-5 mb-6;
  }

  .checkEmail {
    @apply text-base mt-6;
    margin-bottom: 0.875rem;
  }

  .getCode {
    @apply text-sm cursor-pointer text-theme;
  }

  .codeText {
    @apply text-sm;
    color: #b3b3b3;
  }

  .agree {
    @apply w-full justify-center mt-10 text-xs flex items-center;
    height: 1.125rem;
    color: #666;

    .radio {
      @apply cursor-pointer inline-block mr-2 relative border border-solid;
      width: 0.875rem;
      height: 0.875rem;
      vertical-align: center;
      border-color: #666;
      border-radius: 50%;
    }

    .radioActive {
      @apply bg-theme;

      &::before {
        @apply absolute;
        content: '';
        left: 4.3125rem;
        top: 0.125rem;
        width: 0.1875rem;
        height: 0.375rem;
        border: solid var(--theme-color);
        border-width: 0 0.0625rem 0.0625rem 0;
        transform: rotate(45deg);
      }
    }
  }
}

// 密码登录
.checkPwd {
  @include ani();

  .btn {
    @apply bg-theme text-white text-base;
    width: 20rem;
    height: 2.75rem;
  }

  .tip {
    @apply text-xs mt-2 mb-6;
    color: #868686;
    line-height: 1.125rem;
  }

  .email {
    @apply text-white text-center text-base mb-3;
  }

  .error {
    @apply flex justify-between items-center mt-2 mb-6 text-xs;
    height: 1.125rem;
    color: #ff3e3e;
    line-height: 1.125rem;

    & > span:last-child {
      @apply cursor-pointer;
      color: #868686;
    }
  }

  .noEmail {
    @apply cursor-pointer w-full text-center text-xs mb-5 text-theme;
    text-decoration: underline;
  }
}

// 重设密码验证
.regetPwd {
  @include ani();

  .btn {
    @apply bg-theme text-base text-white;
    width: 20rem;
    height: 2.75rem;
  }

  .error {
    @apply text-xs mt-2;
    color: #ff3e3e;
    line-height: 1.125rem;
  }

  .p {
    @apply w-full text-center text-sm text-white;
    line-height: 1.375rem;
  }

  .code {
    @apply mt-5 mb-6;
  }

  .noget {
    @apply mt-10 w-full text-center text-xs;
    line-height: 1.125rem;
    color: #b2b2b2;

    .reSend {
      @apply cursor-pointer text-theme;
    }
  }
}

// 重设密码DOM
.resetPwd {
  @include ani();

  .btn {
    @apply bg-theme text-base text-white;
    width: 20rem;
    height: 2.75rem;
  }

  .email {
    @apply text-white text-center text-base mb-5;
  }

  .error {
    @applu flex justify-between items-center mt-2 mb-6 text-xs;
    height: 1.125rem;
    color: #ff3e3e;
    line-height: 1.125rem;

    & > span:last-child {
      @apply cursor-pointer;
      color: #868686;
    }
  }

  .pwd {
    @apply mt-6 mb-2;
  }

  .p {
    @apply text-xs mb-6;
    line-height: 1.125rem;
    color: #868686;
  }
}
.btnLoading {
  background-color: #999 !important;
}

@media screen and (max-width: 767px) {
  .loginBox {
    @apply p-4 overflow-x-hidden overflow-y-auto;
    width: calc(100% - 2rem);
    font-size: 0.75rem;

    .title {
      @apply mb-5;
    }

    input {
      font-size: 0.75rem;
    }

    .signIn {
      .btn {
        @apply w-full;
      }

      .codeText {
        font-size: 0.75rem;
      }

      .getCode {
        @apply text-xs;
      }
    }
  }

  .enterEmail {
    .btn {
      @apply w-full;
    }
  }

  .checkPwd {
    @apply w-full;

    .btn {
      @apply w-full;
    }
  }

  // 重设密码DOM
  .resetPwd {
    @apply w-full;

    .btn {
      @apply w-full;
    }
  }

  // 重设密码验证
  .regetPwd {
    @apply w-full;

    .btn {
      @apply w-full;
    }
  }
}
